package ExerciseGroup;

import java.util.Scanner;

public class StudentsGredaJudge {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);

        System.out.print("请输入学生人数：");
        int peopleOfNumber = scan.nextInt();

        int[] score = new int[peopleOfNumber];

        System.out.println("请输入学生的成绩：");
        for (int i = 0; i < score.length; i++){
            int personalNumber = scan.nextInt();
            score[i] = personalNumber;
        }

        for (int j : score) {
            System.out.println("学生的成绩分别为：" + j);
            //    int max = (int) Collections.max(Arrays.asList(score));
        }

        int maxScore = 0;
        for (int j : score) {
            if (maxScore < j) {
                maxScore = j;
            }
        }
        System.out.println("最高分为：" + maxScore);
    }
}
